References to Wildcards


In the section Wildcards you have read about the different ways to define a wirdcard. You will now learn how to refer to the values Welcome has assigned to those wildcards.


References to wildcards

As wildcards are only used inside the five "Wildcard Formulars"fields, there is an easy way to refer to each wildcard that you are using:

A reference to a wildcard is build of the first letter of the field name and the index of this wildcard by counting them from left to right. So a reference is always in the form of <Xn> where X is one of P,H,R,L,B and n can be in the range of 0...9

Example:

You have entered [^/]/*-*.html in the Path: field. There are three wildcards in this expression:
1) [^/]
2) * (before the -)
3) * (after the -)
To refer to these wildcards in the "Wildcard Evaluation" section, you can use <P1>, <P2> and <P3> in "Path Result:" or "Jump To:". For example, you can cut of the last part of the url by putting "<P1>/newfile.html"in "Path Result:".


How to determine a match in a field

For each field, there is a special reference <P0>,<H0>,<R0>,<L0>or <B0> which you can use in a boolean expression. They will indicate if Welcome was able to find values for all wildcards in that field. If at least one wildcard cannot be matched against the input parameter, <X0>is false, otherwise true.

Example:

If you have set the Path: field as in the example before, you can execute the rule only if the input path can be matched against the Path: expression. Simply put <P0> into "Execute Condition:" and your're done.


Boolean Expressions

You can combine <X0> (X = P,H,R,L,B) with boolean operators & (and) and | (or). You can also negate a result by placing ! inside the brackets: <!X0>

Example:

"<P0>&<!R0>" put into the "Execute Condition:" field means: execute this rule only if there was a match in "Path:" and not in "Referer:".